home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / X11 / XAllocSizeHints.z / XAllocSizeHints
Encoding:
Text File  |  1998-10-30  |  16.9 KB  |  507 lines

  1.  
  2.  
  3.  
  4.      XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XAllocSizeHints, XSetWMNormalHints, XGetWMNormalHints,
  10.           XSetWMSizeHints, XGetWMSizeHints, XSizeHints - allocate size
  11.           hints structure and set or read a window's WM_NORMAL_HINTS
  12.           property
  13.  
  14.      SSSSYYYYNNNNTTTTAAAAXXXX
  15.           XSizeHints *XAllocSizeHints()
  16.  
  17.           void XSetWMNormalHints(_d_i_s_p_l_a_y, _w, _h_i_n_t_s)
  18.                 Display *_d_i_s_p_l_a_y;
  19.                 Window _w;
  20.                 XSizeHints *_h_i_n_t_s;
  21.  
  22.           Status XGetWMNormalHints(_d_i_s_p_l_a_y, _w, _h_i_n_t_s__r_e_t_u_r_n,
  23.           _s_u_p_p_l_i_e_d__r_e_t_u_r_n)
  24.                 Display *_d_i_s_p_l_a_y;
  25.                 Window _w;
  26.                 XSizeHints *_h_i_n_t_s__r_e_t_u_r_n;
  27.                 long *_s_u_p_p_l_i_e_d__r_e_t_u_r_n;
  28.  
  29.           void XSetWMSizeHints(_d_i_s_p_l_a_y, _w, _h_i_n_t_s, _p_r_o_p_e_r_t_y)
  30.                 Display *_d_i_s_p_l_a_y;
  31.                 Window _w;
  32.                 XSizeHints *_h_i_n_t_s;
  33.                 Atom _p_r_o_p_e_r_t_y;
  34.  
  35.           Status XGetWMSizeHints(_d_i_s_p_l_a_y, _w, _h_i_n_t_s__r_e_t_u_r_n,
  36.           _s_u_p_p_l_i_e_d__r_e_t_u_r_n, _p_r_o_p_e_r_t_y)
  37.                 Display *_d_i_s_p_l_a_y;
  38.                 Window _w;
  39.                 XSizeHints *_h_i_n_t_s__r_e_t_u_r_n;
  40.                 long *_s_u_p_p_l_i_e_d__r_e_t_u_r_n;
  41.                 Atom _p_r_o_p_e_r_t_y;
  42.  
  43.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  44.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  45.  
  46.           _h_i_n_t_s     Specifies the size hints for the window in its
  47.                     normal state.
  48.  
  49.           _h_i_n_t_s     Specifies the _X_S_i_z_e_H_i_n_t_s structure to be used.
  50.  
  51.           _h_i_n_t_s__r_e_t_u_r_n
  52.                     Returns the size hints for the window in its
  53.                     normal state.
  54.  
  55.           _p_r_o_p_e_r_t_y  Specifies the property name.
  56.  
  57.           _s_u_p_p_l_i_e_d__r_e_t_u_r_n
  58.                     Returns the hints that were supplied by the user.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           _w         Specifies the window.
  75.  
  76.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  77.           The _X_A_l_l_o_c_S_i_z_e_H_i_n_t_s function allocates and returns a pointer
  78.           to a _X_S_i_z_e_H_i_n_t_s structure.  Note that all fields in the
  79.           _X_S_i_z_e_H_i_n_t_s structure are initially set to zero.  If
  80.           insufficient memory is available, _X_A_l_l_o_c_S_i_z_e_H_i_n_t_s returns
  81.           NULL.  To free the memory allocated to this structure, use
  82.           _X_F_r_e_e.
  83.  
  84.           The _X_S_e_t_W_M_N_o_r_m_a_l_H_i_n_t_s function replaces the size hints for
  85.           the WM_NORMAL_HINTS property on the specified window.  If
  86.           the property does not already exist, _X_S_e_t_W_M_N_o_r_m_a_l_H_i_n_t_s sets
  87.           the size hints for the WM_NORMAL_HINTS property on the
  88.           specified window.  The property is stored with a type of
  89.           WM_SIZE_HINTS and a format of 32.
  90.  
  91.           _X_S_e_t_W_M_N_o_r_m_a_l_H_i_n_t_s can generate _B_a_d_A_l_l_o_c and _B_a_d_W_i_n_d_o_w
  92.           errors.
  93.  
  94.           The _X_G_e_t_W_M_N_o_r_m_a_l_H_i_n_t_s function returns the size hints stored
  95.           in the WM_NORMAL_HINTS property on the specified window.  If
  96.           the property is of type WM_SIZE_HINTS, is of format 32, and
  97.           is long enough to contain either an old (pre-ICCCM) or new
  98.           size hints structure, _X_G_e_t_W_M_N_o_r_m_a_l_H_i_n_t_s sets the various
  99.           fields of the _X_S_i_z_e_H_i_n_t_s structure, sets the supplied_return
  100.           argument to the list of fields that were supplied by the
  101.           user (whether or not they contained defined values), and
  102.           returns a nonzero status.  Otherwise, it returns a zero
  103.           status.
  104.  
  105.           If _X_G_e_t_W_M_N_o_r_m_a_l_H_i_n_t_s returns successfully and a pre-ICCCM
  106.           size hints property is read, the supplied_return argument
  107.           will contain the following bits:
  108.  
  109.           (USPosition|USSize|PPosition|PSize|PMinSize|
  110.            PMaxSize|PResizeInc|PAspect)
  111.  
  112.           If the property is large enough to contain the base size and
  113.           window gravity fields as well, the supplied_return argument
  114.           will also contain the following bits:
  115.  
  116.           PBaseSize|PWinGravity
  117.  
  118.           _X_G_e_t_W_M_N_o_r_m_a_l_H_i_n_t_s can generate a PN BadWindow error.
  119.  
  120.           The _X_S_e_t_W_M_S_i_z_e_H_i_n_t_s function replaces the size hints for the
  121.           specified property on the named window.  If the specified
  122.           property does not already exist, _X_S_e_t_W_M_S_i_z_e_H_i_n_t_s sets the
  123.           size hints for the specified property on the named window.
  124.           The property is stored with a type of WM_SIZE_HINTS and a
  125.           format of 32.  To set a window's normal size hints, you can
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           use the _X_S_e_t_W_M_N_o_r_m_a_l_H_i_n_t_s function.
  141.  
  142.           _X_S_e_t_W_M_S_i_z_e_H_i_n_t_s can generate _B_a_d_A_l_l_o_c, _B_a_d_A_t_o_m, and
  143.           _B_a_d_W_i_n_d_o_w errors.
  144.  
  145.           The _X_G_e_t_W_M_S_i_z_e_H_i_n_t_s function returns the size hints stored
  146.           in the specified property on the named window.  If the
  147.           property is of type WM_SIZE_HINTS, is of format 32, and is
  148.           long enough to contain either an old (pre-ICCCM) or new size
  149.           hints structure, _X_G_e_t_W_M_S_i_z_e_H_i_n_t_s sets the various fields of
  150.           the _X_S_i_z_e_H_i_n_t_s structure, sets the supplied_return argument
  151.           to the list of fields that were supplied by the user
  152.           (whether or not they contained defined values), and returns
  153.           a nonzero status.  Otherwise, it returns a zero status.  To
  154.           get a window's normal size hints, you can use the
  155.           _X_G_e_t_W_M_N_o_r_m_a_l_H_i_n_t_s function.
  156.  
  157.           If _X_G_e_t_W_M_S_i_z_e_H_i_n_t_s returns successfully and a pre-ICCCM size
  158.           hints property is read, the supplied_return argument will
  159.           contain the following bits:
  160.  
  161.           (USPosition|USSize|PPosition|PSize|PMinSize|
  162.            PMaxSize|PResizeInc|PAspect)
  163.  
  164.           If the property is large enough to contain the base size and
  165.           window gravity fields as well, the supplied_return argument
  166.           will also contain the following bits:
  167.  
  168.           PBaseSize|PWinGravity
  169.  
  170.           _X_G_e_t_W_M_S_i_z_e_H_i_n_t_s can generate _B_a_d_A_t_o_m and _B_a_d_W_i_n_d_o_w errors.
  171.  
  172.      PPPPRRRROOOOPPPPEEEERRRRTTTTIIIIEEEESSSS
  173.           WM_NORMAL_HINTS
  174.                     Size hints for a window in its normal state.  The
  175.                     C type of this property is _X_S_i_z_e_H_i_n_t_s.
  176.  
  177.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  178.           The _X_S_i_z_e_H_i_n_t_s structure contains:
  179.  
  180.           /* Size hints mask bits */
  181.           #define
  182.                     _U_S_P_o_s_i_t_i_o_n
  183.                                   (1L << 0)
  184.                                                         /* user specified x, y */
  185.           #define
  186.                     _U_S_S_i_z_e
  187.                                   (1L << 1)
  188.                                                         /* user specified width, height
  189.                                                         */
  190.  
  191.           #define
  192.                     _P_P_o_s_i_t_i_o_n
  193.                                   (1L << 2)
  194.                                                         /* program specified position
  195.                                                         */
  196.  
  197.           #define
  198.                     _P_S_i_z_e
  199.                                   (1L << 3)
  200.                                                         /* program specified size */
  201.           #define
  202.                     _P_M_i_n_S_i_z_e
  203.                                   (1L << 4)
  204.                                                         /* program specified minimum
  205.                                                         size */
  206.  
  207.           #define
  208.  
  209.  
  210.  
  211.  
  212.  
  213.      Page 3                                          (printed 4/30/98)
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.      XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  221.  
  222.  
  223.  
  224.                     _P_M_a_x_S_i_z_e
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.                                   (1L << 5)
  274.  
  275.  
  276.  
  277.  
  278.  
  279.      Page 4                                          (printed 4/30/98)
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.      XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  287.  
  288.  
  289.  
  290.                                                         /* program specified maximum
  291.                                                         size */
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.      Page 5                                          (printed 4/30/98)
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.      XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  353.  
  354.  
  355.  
  356.           #define
  357.                     _P_R_e_s_i_z_e_I_n_c
  358.                                   (1L << 6)
  359.                                                         /* program specified resize
  360.                                                         increments */
  361.  
  362.           #define
  363.                     _P_A_s_p_e_c_t
  364.                                   (1L << 7)
  365.                                                         /* program specified min and
  366.                                                         max aspect ratios */
  367.  
  368.           #define
  369.                     _P_B_a_s_e_S_i_z_e
  370.                                   (1L << 8)
  371.           #define
  372.                     _P_W_i_n_G_r_a_v_i_t_y
  373.                                   (1L << 9)
  374.           #define
  375.                     _P_A_l_l_H_i_n_t_s
  376.                                   (PPosition|PSize|
  377.                                   PMinSize|PMaxSize|
  378.                                   PResizeInc|PAspect)
  379.  
  380.  
  381.           /* Values */
  382.  
  383.           typedef struct {
  384.                long flags;         /* marks which fields in this structure are defined */
  385.                int x, y;           /* Obsolete */
  386.                int width, height;  /* Obsolete */
  387.                int min_width, min_height;
  388.                int max_width, max_height;
  389.                int width_inc, height_inc;
  390.                struct {
  391.                       int x;       /* numerator */
  392.                       int y;       /* denominator */
  393.                } min_aspect, max_aspect;
  394.                int base_width, base_height;
  395.                int win_gravity;
  396.                /* this structure may be extended in the future */
  397.           } XSizeHints;
  398.  
  399.           The x, y, width, and height members are now obsolete and are
  400.           left solely for compatibility reasons.  The min_width and
  401.           min_height members specify the minimum window size that
  402.           still allows the application to be useful.  The max_width
  403.           and max_height members specify the maximum window size.  The
  404.           width_inc and height_inc members define an arithmetic
  405.           progression of sizes (minimum to maximum) into which the
  406.           window prefers to be resized.  The min_aspect and max_aspect
  407.           members are expressed as ratios of x and y, and they allow
  408.           an application to specify the range of aspect ratios it
  409.           prefers.  The base_width and base_height members define the
  410.           desired size of the window.  The window manager will
  411.           interpret the position of the window and its border width to
  412.           position the point of the outer rectangle of the overall
  413.           window specified by the win_gravity member.  The outer
  414.           rectangle of the window includes any borders or decorations
  415.           supplied by the window manager.  In other words, if the
  416.           window manager decides to place the window where the client
  417.           asked, the position on the parent window's border named by
  418.           the win_gravity will be placed where the client window would
  419.           have been placed in the absence of a window manager.
  420.  
  421.           Note that use of the _P_A_l_l_H_i_n_t_s macro is highly discouraged.
  422.  
  423.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  424.  
  425.  
  426.  
  427.      PPPPaaaaggggeeee 6666                                          ((((pppprrrriiiinnnntttteeeedddd 4444////33330000////99998888))))
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.      XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXAAAAllllllllooooccccSSSSiiiizzzzeeeeHHHHiiiinnnnttttssss((((3333XXXX11111111))))
  435.  
  436.  
  437.  
  438.           _B_a_d_A_l_l_o_c  The server failed to allocate the requested
  439.                     resource or server memory.
  440.  
  441.           _B_a_d_A_t_o_m   A value for an Atom argument does not name a
  442.                     defined Atom.
  443.  
  444.           _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  445.                     defined Window.
  446.  
  447.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  448.           XAllocClassHint(3X11), XAllocIconSize(3X11),
  449.           XAllocWMHints(3X11), XFree(3X11), XSetCommand(3X11),
  450.           XSetTransientForHint(3X11), XSetTextProperty(3X11),
  451.           XSetWMClientMachine(3X11), XSetWMColormapWindows(3X11),
  452.           XSetWMIconName(3X11), XSetWMName(3X11),
  453.           XSetWMProperties(3X11), XSetWMProtocols(3X11),
  454.           XStringListToTextProperty(3X11)
  455.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.      Page 7                                          (printed 4/30/98)
  494.  
  495.  
  496.  
  497.